<template>
	<el-card class="box-card">
	  <div slot="header" class="clearfix">
		<span>Vue Router</span>
	  </div>
	  <div class="text item">
			<div class="bg-img">{{ $route.params.id }}</div>
			<div>{{testr}}</div>
	  </div>
	</el-card>
</template>
<script>
	export default{
		watch: {
			'$route' (to, from) {
				console.log('参数改变,但组件复用');
				console.log(from);
				console.log(to);
			}
		},
		computed: {
			testr: function(){
				console.log(this.$router);
				return 1;
			}
		}
	}
</script>
<style lang="less">
</style>
